import request from '@/utils/request.js'

/* 首页 */
//首页数据获取
export const swiperImg = ()=>{
    return request.get('home/swiperdata')
}
//首页分类菜单获取
export const firstCategory = () => request.get('home/catitems')
//首页楼层数据获取
export const firstBulidData = () => request.get('home/floordata')

/* 分类 */
//分类数据
export const categoryData = () => request.get('categories')

/* 商品列表 */
export const goodsLsit = (obj) => request.get('goods/search', obj)

/* 商品详情页 */
export const goodDetail = (obj) => request.get('goods/detail', obj)
/* 用户授权 */
export const getToken = (obj) => request.post('users/wxlogin', obj)
/* 登录后的操作 */
    //创建订单
export const orderCreate = (obj) => request.auth('my/orders/create', obj)
    //订单支付
export const orderPay = (obj) => request.auth('my/orders/req_unifiedorder', obj)
    //订单支付状态查询
export const orderPayCheck = (obj) => request.auth('my/orders/create', obj)
    //订单查询 get请求
export const orderCheck = (obj) => request.auth.get('my/orders/create',obj)